using Volo.Abp.Settings;
using Volo.Abp.Localization;
using Joy.Erp.BasicArchives.Localization;

namespace Joy.Erp.BasicArchives.ItemMasters
{
    internal class ItemCategorySettingProvider : SettingDefinitionProvider
    {
        public override void Define(ISettingDefinitionContext context)
        {
            context.Add(
                new SettingDefinition(
                    $"UniqueCode:{typeof(ItemCategory).FullName}",
                    null,
                    L($"ModelSettingDisplayName:{typeof(ItemCategory).FullName}.UniqueCode"),
                    L($"ModelSettingDescription:{typeof(ItemCategory).FullName}.UniqueCode"),
                    isVisibleToClients: true
                )
            );
        }

        private static LocalizableString L(string name)
        {
            return LocalizableString.Create<BasicArchivesResource>(name);
        }
    }
}
